import { getConfig } from '../utils/configHelper.js';
export async function getNews(typeId) {
    const API_KEY = getConfig('API_KEY');
    const API_SECRET = getConfig('API_SECRET');
    const API_URL = getConfig('API_URL');

    const res = await fetch(
    `${API_URL}?typeId=${typeId}&page=1&app_id=${API_KEY}&app_secret=${API_SECRET}`
  );
  const data = await res.json();

  return data.data;

}